<?php $this->headTitle('Add Product Category'); ?>

<?php
$formCategory->setAttribute('action', $this->url('product-admin/doaction', array(
            'controller' => 'product-admin-controller',
            'action' => 'add-category'
)));
$formCategory->setAttribute('class', 'form-horizontal');
$formCategory->prepare();
echo $this->form()->openTag($formCategory);
?>
<div class="form-group">
    <?php echo $this->formLabel($formCategory->get('category_name')); ?>
    <div class="col-md-4">
        <?php echo $this->formInput($formCategory->get('category_name')); ?>
        <?php if ($this->formElementErrors($formCategory->get('category_name'))) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $this->formElementErrors($formCategory->get('category_name')); ?>
            </div>
        <?php } ?>
    </div>
</div>
<div class="form-group">
    <?php echo $this->formLabel($formCategory->get('category_image')); ?>
    <div class="col-md-4">
        <?php echo $this->formFile($formCategory->get('category_image')); ?>
        <?php if ($this->formElementErrors($formCategory->get('category_image'))) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $this->formElementErrors($formCategory->get('category_image')); ?>
            </div>
        <?php } ?>
    </div>
</div>
<div class="form-group">
    <?php echo $this->formLabel($formCategory->get('category_parent')); ?>
    <div class="col-md-4">
        <?php echo $this->formSelect($formCategory->get('category_parent')); ?>
        <?php if ($this->formElementErrors($formCategory->get('category_parent'))) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $this->formElementErrors($formCategory->get('category_parent')); ?>
            </div>
        <?php } ?>
    </div>
</div>
<div class="form-group">
    <?php echo $this->formLabel($formCategory->get('relation_maker_id')); ?>
    <?php echo $this->formMultiCheckbox($formCategory->get('relation_maker_id')); ?>
    <?php if ($this->formElementErrors($formCategory->get('relation_maker_id'))) { ?>
        <div class="alert-danger" style="margin-top: 10px;">
            <?php echo $this->formElementErrors($formCategory->get('relation_maker_id')); ?>
        </div>
    <?php } ?>
</div>
<div class="form-group">
    <?php echo $this->formLabel($formCategory->get('category_meta_title')); ?>
    <div class="col-md-4">
        <?php echo $this->formInput($formCategory->get('category_meta_title')); ?>
        <?php if ($this->formElementErrors($formCategory->get('category_meta_title'))) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $this->formElementErrors($formCategory->get('category_meta_title')); ?>
            </div>
        <?php } ?>
    </div>
</div>
<div class="form-group">
    <?php echo $this->formLabel($formCategory->get('category_meta_keyword')); ?>
    <div class="col-md-4">
        <?php echo $this->formInput($formCategory->get('category_meta_keyword')); ?>
        <?php if ($this->formElementErrors($formCategory->get('category_meta_keyword'))) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $this->formElementErrors($formCategory->get('category_meta_keyword')); ?>
            </div>
        <?php } ?>
    </div>
</div>
<div class="form-group">
    <?php echo $this->formLabel($formCategory->get('category_meta_description')); ?>
    <div class="col-md-4">
        <?php echo $this->formTextarea($formCategory->get('category_meta_description')); ?>
        <?php if ($this->formElementErrors($formCategory->get('category_meta_description'))) { ?>
            <div class="alert-danger" style="margin-top: 10px;">
                <?php echo $this->formElementErrors($formCategory->get('category_meta_description')); ?>
            </div>
        <?php } ?>
    </div>
</div>

<?php echo $this->formHidden($formCategory->get('category_id')); ?>
<?php echo $this->formHidden($formCategory->get('action_type')); ?>

<div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
        <?php echo $this->formSubmit($formCategory->get('category_submit')); ?>
    </div>
</div>

<?php echo $this->form()->closeTag(); ?>